System and method for encoding and detecting extensible patterns

ABSTRACT

Given an input sequence of data, a rigid pattern is a repeating sequence, possibly interspersed with don&#39;t-care characters. The data can be a sequence of characters or sets of characters or even real values. In practice, the patterns or motifs of interest are the ones that also allow a variable number of gaps (or don&#39;t-care characters): these are patterns with spacers termed extensible patterns. In a bioinformatics context, similar patterns have also been called flexible patterns or motifs. A system according to the invention discovers all the maximal extensible motifs in the input. The flexibility is succinctly defined by a single integer parameter D≧1 which is interpreted as the allowable space to be between 1 and D characters between two successive solid characters in a reported motif.

CROSS-REFERENCE TO RELATED APPLICATIONS

Not Applicable.

STATEMENT REGARDING FEDERALLY SPONSORED-RESEARCH OR DEVELOPMENT

Not Applicable.

INCORPORATION BY REFERENCE OF MATERIAL SUBMITTED ON A COMPACT DISC

Not Applicable.

FIELD OF THE INVENTION

The invention disclosed broadly relates to the field of information processing systems, and more particularly relates to the field of systems for detecting patterns in information strings.

BACKGROUND OF THE INVENTION

A rigid motif is a repeating pattern in a string of data comprising a plurality of tokens such as alphabet characters, possibly interspersed with don't-care characters that has the same length in every occurrence in the input sequence. Pattern or motif discovery in data is widely used for understanding large volumes of data such as DNA or protein sequences.

Allowing the motifs to have a variable number of gaps (or don't-care characters), called patterns with spacers or extensible motifs, further increases the expressibility of the motifs. For example, given a string s=abcdaXcdabbcd, m=a.cd is a rigid pattern that occurs twice in the data at positions 1 and 5 in s. In the above example, the extensible motif, where the number of don't-care characters between a and c of the pattern is one or two, would occur three times at positions 1, 5 and 9. At position 9 the dot character represents two gaps instead of one.

The task of discovering patterns must be clearly distinguished from that of matching a given pattern in a string of characters or database. In the latter situation, we know what we are looking for, while in the former we do not know what is being sought. Typically, the higher the self similarity (i.e., repeating patterns) in the sequence, the greater is the number of patterns or motifs in the data. Motif discovery on data such as repeating DNA or protein sequences is indeed a source of concern because these exhibit a very high degree of self similarity. The number of rigid maximal motifs could potentially be exponential in the size of the input sequence.

The problem of a large number of motifs is usually tackled by pre-processing the input, using heuristics, to remove the repeating or self similar portions of the input or using a statistical significance measure. However, due to the absence of a good understanding of the domain, there is no consensus over the right model to use. Thus there is a trend towards model-less motif discovery in different fields. There has been empirical evidence showing that the run time is linear in the output size for the rigid motifs and experimental comparisons between available implementations.

Consider an example of a rigid pattern (albeit with don't-care characters) discovery tool that is often inadequate in detecting biologically significant motifs. Fibronectin is a plasma protein that binds cell surfaces and various compounds including collagen, fibrin, heparin, DNA, and actin. The major part of the sequence of fibronectin consists of the repetition of three types of domains, which are called type I, II, and III. The type II domain is approximately forty residues long, contains four conserved cysteines involved in disulfide bonds and is part of the collagen binding region of fibronectin. In fibronectin the type II domain is duplicated. Type II domains have also been found in various other proteins. The fibronectin type II domain pattern has the following form:

C...PF.[FYWI].......C-(8,10)WC....[DNSR] [FYW]-(3,5)[FYW].[FYWI]C

The extensible part of the pattern is shown as integer intervals. It is clear that a rigid pattern discovery tool will never capture this as a single domain. Therefore, there is need for a system and method of pattern discovery that overcomes the drawbacks in the prior art.

SUMMARY OF THE INVENTION

Briefly, according to the invention an input string of tokens (e.g., characters) is analyzed for token patterns. A system embodying the invention is based on an inexact suffix tree construction which provides a framework for an output sensitive detection algorithm.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an inexact suffix tree for a token string.

FIGS. 2 a–e are a flow chart illustrating a method according to the invention.

FIGS. 3–14 illustrate construction of an inexact suffix tree for a string comprising the character sequence axcdabydaxy.

FIGS. 15–16 are tables showing the results of using a method according to the invention on a collection of fibronectin sequences.

FIG. 17 is a small sample output after using the method according to the invention on a collection of fibronectin sequences.

FIG. 18 is a block diagram of an information processing system using the invention.

DETAILED DESCRIPTION

To facilitate a clear understanding of the present invention, definitions of terms employed herein will now be given.

Dot character: The ‘.’ is called a “don't-care” or a dot character and any other element is called solid. Also, σ will refer to a singleton character or a set of characters from Σ. Let s be a sequence of sets of characters from an alphabet Σ, ‘.’∉Σ. For brevity of notation, a singleton set is not enclosed in curly braces. For example, let Σ={A, C, G, T}, then s₁=ACTGAT and s₂={A,T}CG{T, G} are two possible sequences. The j^(th) (1≦j≦|s|) element of the sequence is given by s[j]. For instance in the above example s₂[1]={A,T}, s₂[2]={C}, s₂[3]={G} and s₂(4)={T, G}. Also, if x is a sequence, then |x| denotes the length of the sequence and if x is a set of elements then |x| denotes the cardinality of the set. Hence |s₁|=6, |s₂|=4, |s₁|[1]=1 and |s₂|[4]=2.

e_(l)

e₂: We say that e₁

e₂ if and only if e₁ is a don't-care character or e₁ is a subset of e₂. For example, if e₁={A, C}, e₂={A,C,G} and e₃={T} are three elements of some sequence, then e₁

e₂ and e₁/

e₃.

Annotated Dot Character, .^(α): An annotated “.” character is written as .^(α) where α is a set of non-negative integers {α₁, α₂, . . . , α₃} or an interval α=[α_(l), α_(u)], representing all integers between α_(l), and α_(u) including α_(l), and α_(u). To avoid clutter, the annotation superscript α will be an integer interval.

Rigid, extensible string: Given a string m, if at least one dot element, is annotated, m is called a extensible string, otherwise m is called rigid.

Realization: Let m be a extensible string. A rigid string m′ is a realization of m if each annotated dot element, .^(α) is replaced by l dot elements where l∈α. For example, if m=α.[^(2,4)]b.[^(3,6)]cde, then m′=a...b...cde is a realization of m and so is m″=a...b....cde.

m occurs at l: A rigid string m occurs at position l on s if m[j]

s[l+j) holds for l≦j≦|m|. A extensible string m occurs at position l in s if there exists a realization m′ of m that occurs at 1. If m is extensible then m could possibly occur a multiple number of times at a location on a string s. For example, if s=axbcbc, then m=a.[^(1,3)]b occurs twice at position 1 as axbcbc and axbcbc.

Size of m, |m|: If m is rigid, size of m is the number of solid and dot characters in m and is denoted by |m|. If m is extensible and occurs at positions in L_(m), then |m|=max_(i) |m′_(i)| where m′_(i) is a realization of m that occurs at i ∈ L_(m). Consider s=abcdabeed. Let m₁=ab, m₂=ab-d. Then |m₁|=2 and |m₂|=max{|ab.d|, |ab..d|}=5.

k-motif m, location list L_(m): Given a string s on alphabet Σ and a positive integer k, k≦|s|, a string (extensible or rigid) m is a motif with location list L_(m)=(l₁,l₂, . . . , l_(p)), if m[l]≠‘.’, m[|m|]≠‘.’ and m occurs at each l∈L_(m) with p≧k. Also L_(m) is complete, i.e., if there exists j such that m occurs at j then j ∈ L_(m). To avoid clutter, in the rest of the discussion a k-motif will be referred to simply as a motif. The associated k should be clear from the context.

Realization of a motif m of s: Given a motif m on an input string s with a location list L_(m), and m′ a realization of the string m, then m′ is a realization of the motif m if and only if there exists some i∈L_(m) such that m′ occurs at i in s.

Notice that because of our notation of annotating a dot character with an integer interval (instead of a set of integers), not every realization of the extensible string occurs in the input string. For example for s=axbcbc, p=a^(.[1,3])b is a extensible motif on s. p′=a..b is a realization of the string p but not of the motif p since p′ does not occur in s. In the remaining discussion we will use this stricter definition of motif realization unless otherwise specified.

m₁

m₂: Given two motifs m₁ and m₂ on s m_(l)

m₂ holds if at each occurrence i on s, the realization m′₁ of motif m₁ at i there exists a realization m′₂ of motif m₂ at i such that m′₁ [j]

m₂ [j], 1≦j≦l where l=max |m′₁|, |m′₂|. For example, let m₁=AB..E and m₂=ABC.E.G occurring at position 1 of string s=ABCXEYGXXABYYEABCYEYG. Then m₁

m₂ at position 1, and m₂

m₁ at position 1.

Sub-motifs of motif m: Given a motif m let m[j₁], m[j₂], . . . m[j_(l)] be the l solid elements in the motif m. Then the sub-motifs of m are given as follows: for every j_(i), j_(t), the sub-motif m[j_(i) . . . j_(t)] is obtained by dropping all the elements before (to the left of) j_(i) and all elements after (to the right of) j_(t) in m.

Maximal Motif: Let m₁, m₂, . . . , m_(k) be the motifs in a string s. A motif m_(i) is maximal in composition if and only if there exists no m_(l), l≠i with L_(mi)=L_(ml)., and m_(i)

m_(l). A motif m_(i), maximal in composition, is also maximal in length if and only if there exists no motif m_(j), j≠i, such that m_(i) is a sub-motif of m_(j) and |L_(mi)|=|L_(mj)|. A maximal motif is maximal both in composition and in length.

Cell: Given s, a cell is the smallest substring in any pattern on s, that has exactly two solid characters: one at the start and the other at the end position of this substring.

m^(s) ₁

m^(s) ₂: Given two cell m^(s) ₁ and m^(s) ₂, m^(s) ₁

if one of the following holds:

-   1. m^(s) ₁ has only solid characters and m^(s) ₂ has at least one     non-solid character -   2. m^(s) ₂ has the “−” character and m^(s) ₁ does not -   3. m^(s) ₁ and m^(s) ₂ have d₁, d₂>0 dot characters respectively and     d₁<d₂.

Clearly, the above defines a partial order on the cells.

⊙-compatible, m_(l) ⊙m₂: m_(l) is ⊙-compatible with m₂ if the last solid character of m_(l) is the same as the first solid character of m₂. Further if ml is ⊙-compatible with m₂, then m=m₁⊙m₂ is the concatenation of m_(l) and m₂ with an overlap at the common end and start character and L′ _(m)={((x,y),z)|((x,l),z)∈L′ _(m1),((l,y),z)∈L′ _(m2)

For example if m_(l)=ab and m₂=b.d then m₁ is ⊙-compatible with m₂ and m_(l) ⊙m₂=ab.d. However, m₂ is not ⊙-compatible with m_(l).

Fixed vs. Variable Spacers

We now discuss two different kinds of spacers, fixed and variable. Given a constant D, for rigid motifs it is to be interpreted that the motif can have fixed 1 or 2 or . . . or D dots between successive solid characters and for extensible motifs can have between 1 to D dot characters between successive solid characters. Also, let R be the set of all rigid maximal motifs and let ε be the set of all extensible motifs. The following statement can be easily verified. Given a string s with parameters k and D, then if m_(r)∈R, then there must be m_(f)∈ε such that either m_(r)=m_(f) or m_(r) is a substring of m_(r).

Consider the following two examples. Example 1: If s=aycazxc with k=2, D=2, then ε={a–c} and R={ } with |ε|>|R|. Example 2: Let s=abycpqdefabzcxdef with k=2, D=2. Then R={ab.c, de f} and ε={ab.c-def} with |R|>|ε|. Thus, although in theory there is no relationship between |R| and >|ε|, in practice |R|<|ε|.

Inexact Suffix Tree

We introduce a data structure representing a string, called an inexact suffix tree that efficiently stores all the suffixes of maximal patterns with wild cards (variable or don't-care tokens). The suffix is inexact in the sense that it contains wild cards.

Referring to FIG. 1, there is shown an inexact suffix tree for a string s=axcdabydaxy and with D=2. A solid circle denotes a leaf node. The root node is labeled Z and the internal nodes are labeled A through I. The unique path from the root node (Z) to the leaf node labeled by integer i, represents a string p

s[i . . . n].

The inexact suffix tree is built as follows: Given a string s of size n, let $∉Σ. We terminate s with $ as s$. Let D be the maximum number of don't care characters between any two consecutive solid characters and let k be the minimum number of times a extensible pattern must occur. Consider a rooted tree T with edges labeled by non empty strings with the following properties:

Each leaf node is labeled by an integer 1≦l≦n. The edge label is a sequence on Σ+{‘.’,‘−’}. All the outgoing edges of the root node are labeled by strings that start with a solid character. No two edges out of a node can be labeled with strings that start at the same solid character. Each edge label can have at most D consecutive ‘.’ character and at most one consecutive ‘.’ character. Also, the last character must be solid. For an internal node i, let R(i) be the set of integer labels of the leaves reachable from i.

-   (a) |R(i)|>1 for all i. -   (b) For any two immediate successor internal nodes j₁ and j₂ of i,     R(j₁)≠R(j₂). -   (c) Consider an internal node i and its immediate successor j and     let p=x₁x₂ . . . x_(j), where x_(i)∉Σ or x_(i) is the don't-care or     ‘−’ character, be the label on edge from i to j.

i. R_(j)⊂R_(i).

ii. Consider all possible labels p₁, p₂, . . . p_(l) satisfying the constraint 2 above with each having J characters and the same R_(j), then p₁, p₂, . . . p_(l)

p.

iii. There does not exist label p′ satisfying all the constraints above with p′ having less than J characters and a possible successor node j′ of i such that R_(j)⊂R_(j′), and |R_(j)|>1.

It is easy to now see that given D, the inexact suffix tree is well defined and is unique. When D=0, τ is also called a suffix tree of s. The tree described above is for k=2 for clarity of exposition. It can be trivially generalized to k>2.

The unique path from the root node to the leaf node labeled by integer i, represents s[i . . . n] that is obtained by traversing from the root node to the leaf node: concatenating the edge labels of this path gives p and p

s[i . . . n].

The string associated with the internal node E is p=a..da.y obtained by concatenating the labels on the edges from the root node Z. Given strings p_(i), 1≦i≦l, their meet is p if and only if p

p_(i), and there exists no p′ such that p

p′

p_(i), for all i. We make the following observations about the inexact suffix tree described above. The string obtained by concatenating the edge labels on the unique path from the root to an internal node corresponds to a suffix of a maximal extensible pattern with parameter D and k=2.

Equivalently, consider the internal node j and let p be the string obtained by concatenating the labels on the edges in the path from the root node to the node j. Then p is the meet of the suffixes s[i . . . n] where i∈R(j).

The inexact-suffix tree not only suggests a way of detecting all the extensible patterns efficiently but also gives a data structure for storing the extensible patterns for efficient retrieval or matching.

Implementation

An inexact suffix tree is constructed implicitly (in a different order) in an implementation that is discussed herein. Notice that the suffix tree, described above and illustrated in FIG. 1, produces all the suffixes of the maximal motifs. In the implementation, we detect the suffixes as early in the process as possible and discard them.

Referring to FIG. 2 a, in step 201 we receive an input of a string s of size n and two positive integers, k and D. We begin with a few definitions that will be used in this step. Notice that a cell is the smallest extensible component of a maximal pattern and the string can be viewed as a sequence of overlapping cells. If no don't care characters are allowed in the motifs then the cells are non-overlapping.

The algorithm comprises the following steps:

In step 203 of FIG. 2 a, we begin by constructing patterns that have exactly two solid characters in them and separated by no more than D spaces or “.” characters. This can be done by scanning the string s from left to right. Further, for each location we store start and end positions of the pattern. In the following example a character could also be referred to as a cell, and a string of characters can also be referred to as cells.

For example, if s=abzdabyxd and k=2, D=2, then all the patterns generated at this step are: ab, a.z, a..d, bz, b.d, b..a, zd, z.a, z..b, da, d.b, d..y, a.y, a..x, by, b.x, b..d, yx, y.d, xd, each with a list of where they occur. Further L_(ab)={(1, 2), (5, 6)}, L_(a.z)={(1, 3)} and so on.

In the next step 205, we construct the extensible cells by combining all the characters with at least one dot character and the same start and end solid characters. In step 207 we update the location list to reflect the start and end position of each occurrence. In the previous example, we generate b–d at this step with L_(b-d)={(2, 4), (6, 9)}.

In decision 209, we determine whether the number of times a pattern repeats is less than k. Next in step 211, if |L_(m)|<k, then we discard all extensible strings m. Continuing the previous example, the only surviving cells are ab, b–d with the following equation: L _(ab)={(1,2),(5,6)} and L_(b-d)={(2,4),(6,9)}

This step is used only for quick comparison of location lists and is not vital for the working of the algorithm. Nevertheless, in practice it is a time saving step in detecting non maximal motifs (suffixes of maximal motifs).

In step 213 the input sequence s is broken up into l≧1 subsequences, called zones, Z₁=s[1, j₁], Z₂=s[j₁+1, j2] . . . , Z₁=s[_(j-1)+1, j1] Z_(l+1)=s[j₁+1, |s|] such that each occurrence of each cell is fully contained in a subsequence. This works best when 1 is much smaller than n.

We now continue the previous example, l=1 with z₁=4. Thus Z₁=abzd and Z₂=abxyd. In step 215 we associate the zone number with every occurrence of the cell, and add each occurrence to a collection of cells B, this is continued as step 217 checks all the subsequences of the input sequence have been associated with zones. Thus the augmented location lists are L′ _(ab)={((1, 2),1),((5, 6),2)} and L′ _(b-d)={((2,4),1),((6,9),2)}

We make the following statements about the zones that is straightforward to verify.

Given s, if an occurrence of a cell m_(i) ^(s) contained in a zone Z_(i) then the occurrence of a corresponding maximal extensible pattern m_(i) that contains this occurrence of m_(i) ^(s) is also contained in Z_(i). Hence, the corresponding occurrence of every nonmaximal extensible pattern w.r.t m_(i) is also contained in Z_(i).

Consider a maximal extensible motif m_(i) with |L_(mi)|=K. Let the K-tuple of m_(i) of only the zone numbers be defined as Z_(mi)=(z₁, z₂, . . . , z_(k)) Then for every nonmaximal motif m′_(i) w.r.t. m_(i) the following holds: Z_(m′i)=Z_(mi).

Iteration Phase

We begin with a few definitions that will be used in these steps which are used in an iteration function described below. Let B be a collection of extensible strings. If m=Extract (B), then m∈B and there does not exist m′∈B such that m′

m holds.

The iteration function will have an input of a collection of extensible strings B and an extensible string m′extracted from the collection of extensible strings B and an output of maximal extensible patterns. The output of maximal extensible patterns will be added to a collection of maximal extensible patterns called Result. The following definition is a reiteration of the order of the nodes described in constructing the inexact suffix tree, but stated in terms of cells for clarity of exposition.

The procedure is best described by the following pseudocode.

Result

{ }; Iterate(m,B,Result) B

{m^(s) ₁ | m^(s) ₁ is a cell}; { G:1 m′

m; For each m = Extract(B) G:2 For each b = Extract(B) with Iterate(m,B,Result); G:3 ((b⊙-compatible m′) OR ((b ⊙-compatible b)) Result

Result ∪ B G:4  If (m′ ⊙-compatible b) G:5   mt

m ′⊙ b; G:6   If siblingInconsistent (m_(i)) exit; G:7   If ( | L_(m′) | = | L_(b) | ) B

B − {b}; G:8   If ( | L_(m′) | ≧ k) m′

m_(t) G:9  If (b ⊙ compatible m′) G:10   m_(t)

b ⊙ m′ G:11   If SiblingInconsistent(m_(i)) exit; G:12   If ( | L_(m′) | = | L_(b) | ) B

B − {b}; G:13    If ( | L_(m′) | ≧ k) m′

m_(t) G:14  Iterate (m′,B,Result) G:15  For each r ∈ Result with Z_(r) = Z_(m′) G:16   If (m′ is not maximal w.r.t. r)   return; G:17   Result

Result ∪ {m′}; }

Steps G:15–16 detect the suffix motifs of already detected maximal motifs. Result is the collection of all the maximal extensible patterns.

Referring to FIG. 2 b, in step 219 we extract an extensible string m from a collection of extensible strings B.

In the next step 221, we create a rigid string m′ from the extracted extensible string m.

In the next step 223, we extract another extensible string b from the collection of extensible strings B.

Next in step 225, we determine whether the rigid string m′ is compatible with the extensible string b, or if the extensible string b is compatible with the rigid string m′. If it is determined that they are not compatible with each other, then we replace the extensible string b with another extensible string extracted from the collection of extensible strings B.

In step 227, if both the rigid string m′ and the extensible string b are compatible with each other, then they are concatenated to form a new extensible string m_(t).

In step 229, we then check if the concatenated extensible string m, is non-maximal with respect to its earlier siblings by checking the location lists. This routine corresponds to backtracking, which is always only when the sibling has don't care characters in it.

In step 231, if the concatenated string m_(t) is non maximal, then the method exits to the next iteration (exits the loop).

Referring to FIG. 2 c in step 233, if the concatenated string extensible string m_(t), is maximal with respect to its siblings, then we check if the number of times the rigid string m′ repeats is equal to the number of times the extracted string b repeats.

In step 235 if the number of times the rigid string m′ repeats is equal to the number of times the extracted string b repeats is true, then we remove the extracted string b from the collection of extensible strings B.

In step 237 if the number of times the rigid string m′ repeats is equal to the number of times the extracted string b repeats is false, or after we remove the extracted string b from the collection of extensible strings, we determine if the number of times the rigid string m′ repeats is greater than or equal to the parameter value k.

If the number of times the rigid string m′ repeats is not greater than or equal to the parameter value k, the method returns to step 233 and repeats the iteration.

In step 239 if the number of times the rigid string m′ repeats is greater than or equal to the parameter value k, then we convert the concatenated extensible string m_(t) to a rigid string and replace the rigid string m′ with the converted concatenated string m_(t). The iteration function in G:14 repeats recursively until collection of cells B is empty. Result is the collection of all the concatenated strings extracted. Result is updated whenever a non-maximal pattern is found.

In step 241 we continue to function G:15 when we cannot find any more strings b to concatenate with m.

Referring to FIG. 2 d step 243, determine if the concatenated rigid string m′ is not maximal with respect to the extracted pattern r.

If the concatenated rigid string m′ is not maximal with respect to the extracted pattern r, then we return to G:15.

In step 244 we determine if there are any remaining patterns r in the collection of results Results to extract.

In step 245 if there are no remaining patterns r in the collection of results Results, then we add the concatenated rigid string m′ to the collection of results Results.

If there are remaining patterns r in the collection of results Results, then continue to extract from the collection of results Results by returning to step 241. Once the iteration function has completed, we continue by constructing an inexact tree from the collection of results Results.

In step 247 we begin by extracting the first pattern from the collection of results.

In step 249 we create a root node from the first character in the extracted pattern.

Next, in step 251, we then continue by ordering lower level nodes from left to right of the root node starting with the patterns with no dot characters on the left, to the patterns with up to the parameter D number of dot characters. This step generates a tree with a single lower level, as shown in FIG. 3.

In step 253 of FIG. 2 e, then perform a depth first traversal of each node starting with the left most node and continuing to the right. This step is illustrated in FIG. 4 for the first node on the left and continues as shown in FIG. 5 with the next node to the right.

The tree construction involves some limited backtracking. In step 255, the backtracking is always only one level deep and it occurs when the edge label has don't care characters in it. For example if the edge label is “.a”, then the other siblings of this node are examined to see if the don't-care character is required. This step is illustrated in FIG. 6.

In step 257 we eliminate the identified node from the tree if the backtracking identifies an edge to the left which already contains the pattern. Otherwise we keep the node and perform a depth first traversal as in step 253 as shown in FIG. 7 and FIG. 8. FIG. 9 and FIG. 10 also show a node that does not get eliminated because of sibling inconsistencies.

Step 259 determines if there are any remaining nodes to be checked for inconsistencies. If so, then we continue to step 261, which checks the next node to the right. If there are no further nodes that need to be checked we continue to step 263, which removes all edges that lead to leaf nodes, which is shown in FIG. 11.

Step 265 checks if there are nodes remaining that have more than one outgoing edge. FIG. 13 shows the rightmost node has an outgoing edge.

In step 267 if there are nodes with more than one outgoing edge then the outgoing edge is consolidated to a single outgoing edge, as shown in FIG. 14.

Step 269 completes the construction of the inexact suffix tree. FIG. 14 is a complete inexact suffix tree.

Allowing motifs to have a variable number of gaps (or don't-care characters), i.e., patterns with spacers or extensible motifs, considerably increases the expressibility of the motifs. It is likely that some information missed by rigid motifs is captured by the extensible motifs. The invention is an implementation of an extensible motif discovery algorithm that guarantees the detection of every extensible pattern. One of the directions being currently investigated is to use the method according to the invention to detect extensible patterns in an unsupervised manner on protein sequence databases, and then use suitable pruning techniques to compare the detected patterns with known motifs.

Referring to FIG. 15, there is shown a table showing the output of a small sample, wherein the input data is a collection of fibronectin sequences with D=7 and k=2. The first column gives the number of occurrences of the motif shown in the third column; the second column gives the number of distinct sequences in which the motif appears and the last column gives the occurrence in the format (s: i₁ i₂), where s is the sequence number and the motif starts at i₁ ending at i₂.

Referring to FIG. 16, there is shown a table wherein the input data is a collection of fibronectin sequences with D=7 and k=2. A small sample output is shown in the table. The first column gives the number of occurrences of the motif shown in the third column; the second column gives the number of distinct sequences in which the motif appears. This version uses homologous grouping of the amino acid bases shown in square brackets. The occurrence lists have been removed to avoid clutter.

Referring to FIG. 17, there is shown a table wherein for a small sample output, the input data is a collection of fibronectin sequences with D=7 and k=2. Here the gaps are annotated: −(i₁, i₂), which indicates that the number of gaps are between i₁ and i₂ in the occurrences in the input.

The system of FIG. 18 is useful on primarily biological data such as DNA and protein sequences. However the generality of the system makes it equally applicable in other data mining, clustering, and knowledge extraction applications. The system comprises an input/output device 1806, a CD Drive 1808, a central processing unit 1802, and a memory unit 1804. The memory unit 1804 further comprises an operating system 1812, and an application 1814. The input/output device further comprises a network interface 1807.

Therefore, while there has been described what is presently considered to be the preferred embodiment, it will be understood by those skilled in the art that other modifications can be made within the spirit of the invention. 

1. A method for determining patterns in an input string of tokens, comprising steps of: identifying extensible patterns in the input string; creating an inexact tree for the input string, using the patterns identified; and displaying a set of extensible patterns identified by the inexact tree; wherein creating the inexact tree comprises creating nodes and edges, connecting the nodes, wherein each node represents a subset of a string and each edge connects a lower order node to a higher order node; wherein each subset comprises a pattern comprising extensible string; and wherein each extensible string comprises at least one dot token.
 2. The method of claim 1, further comprising receiving a parameter k specifying the minimum times an extensible pattern must occur in a sequence.
 3. The method of claim 1, wherein the step of identifying patterns in the input string B comprises creating a rigid string m′ from an extensible string m.
 4. The method of claim 1 wherein the step of identifying patterns in the input string B comprises extracting a subset of tokens b from the input string B.
 5. The method of claim 4 analyzing the subset of tokens b to determine whether the subset is compatible with the rigid string m′.
 6. The method of claim 5 wherein if the subset b is compatible with the rigid string m′ the subset and the rigid string are concatenated into a new rigid string m_(t).
 7. The method of claim 6 further comprising the step of running a routine for determining whether the concatenated string is non maximal with respect to nodes of the same order in the tree.
 8. The method of claim 7 further comprising removing each node from the tree that is non maximal with respect to nodes of the same order in the tree.
 9. The method of claim 8 wherein if the magnitude of the location list of the rigid string m′ is equal to the magnitude of the location list of the subset of tokens b then the size of the collection of tokens B is reduced by removing the subset of tokens b determined in the step of extracting a subset of tokens from the input string.
 10. The method of claim 9 wherein if the number of times the rigid string pattern repeats is greater than the minimum number of times an extensible pattern must occur in a sequence k, then the concatenated extensible string m_(t) is converted into a rigid string m′.
 11. The method of claim 10 wherein said method is performed on the converted rigid string m′.
 12. The method of claim 11 further comprising identifying a zone for each subsequence of tokens Z_(r) such that each occurrence of each pattern is fully contained within the zone of the rigid string Z_(m′).
 13. The method of claim 11 further comprising determining whether the rigid string m′ is not maximal with respect to a string of tokens r that are returned from the determination of the routine.
 14. The method of claim 13 wherein the result of the routine m′ is added to a collection of maximal extensible patterns Result.
 15. A system comprising: an input/output device for receiving information including an input string; and a processor for identifying extensible patterns; identifying extensible patterns in the input string; creating an inexact tree for the input string, using the patterns identified; and displaying a set of extensible patterns identified by the inexact tree; wherein creating the inexact tree comprises creating nodes and edges, connecting the nodes, wherein each node represents a subset of a string and each edge connects a lower order node to a higher order node; wherein each subset comprises a pattern comprising extensible string; and wherein each extensible string comprises at least one dot token; and a memory for storing identified patterns and for storing the inexact suffix tree.
 16. The system of claim 15 wherein the input/output device further comprises a CD ROM drive.
 17. The system of claim 15 wherein the input/output device further comprises a network interface.
 18. The system of claim 15 wherein the memory further comprises an operating system.
 19. The system of claim 15 wherein the memory further comprises an application.
 20. A computer readable medium for determining patterns in an input string of tokens, comprising instructions for: identifying extensible patterns in the input string; creating an inexact tree for the input string, using the patterns identified; and displaying a set of extensible patterns identified by the inexact tree; wherein creating the inexact tree comprises creating nodes and edges, connecting the nodes, wherein each node represents a subset of a string and each edge connects a lower order node to a higher order node; wherein each subset comprises a pattern comprising extensible string; and wherein, each extensible string comprises at least one dot token. 